package com.stedu.mapper;

import com.stedu.bean.Employee;
import com.stedu.bean.EmployeeVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;
import java.util.List;

@Repository
public interface EmployeeMapper {
    //根据部门ID查询员工
    List<Employee> findByDid(Integer did);

    Employee findById(Integer eid);

    //查询所有,
    List<EmployeeVo> findByPage(@Param("ename") String ename, @Param("ejob") String ejob);

    //添加
    int add(Employee employee) throws SQLException;
    //查询最大工号
    String maxEno() throws SQLException;
    int chgEstate(@Param("eid") Integer eid,@Param("estate") Integer estate);
    int update(Employee employee);
}
